from django import forms
from rbac import  models
from django.utils.safestring import mark_safe
class MenuModelForm(forms.ModelForm):
    class Meta:
        model = models.Menu
        fields  = ['title','icon']
        widgets = {
            'title':forms.TextInput(attrs={'class':'form-control'}),
            'icon':forms.RadioSelect(choices=[
                ['fa-clipboard',mark_safe('<i class="fa fa-clipboard"></i>')],
                ['fa-quora',mark_safe('<i class="fa fa-quora"></i>')],
                ['minus-circle',mark_safe('<i class="fa fa-minus-circle"></i>')],
                ['fa-motorcycle',mark_safe('<i class="fa fa-motorcycle"></i>')],
            ])
        }



class SecodMenuModelForm(forms.ModelForm):
    class Meta:
        model = models.Permission
        fields  = ['pid']
